package cn.tedu.zx.pojo.court.dto;

import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;


@Data
@TableName("court")
@Accessors(chain = true)
public class CourtUpdateDto implements Serializable {

    @NotNull
    @ApiModelProperty("id标识")
    private Long id;

    @NotNull(message = "修改场地失败，分类名称不能为空")
    @ApiModelProperty(value = "分类id",required = true,example = "2")
    private Long categoryId;

    @NotNull(message = "修改场地失败，场地名称不能为空")
    @ApiModelProperty(value = "场地名称",required = true,example = "场地1")
    private String name;

    @ApiModelProperty(value = "场地描述",example = "微信")
    private String description;

    @NotNull(message = "修改场地失败，场地为不能为空")
    @ApiModelProperty(value = "场地图片url",required = true,example = "a.jpg")
    private String url;


    @Range(min = 0,message = "请输入正确的价格")
    @ApiModelProperty(value = "场地单价",required = true,example = "56.00")
    private BigDecimal price;

    @Range(min = 0,max = 1,message = "请输入0或1,0=禁用，1=启用")
    @ApiModelProperty(value = "场地状态",required = true,example = "0")
    private Integer isEnable;


    @Range(min = 1,max = 100,message = "请输入1-100之间的数字")
    @ApiModelProperty(value = "排序序号",required = true,example = "56")
    private Integer sort;

}
